请用shell或Python编写一个等腰三角形,接受用户输入的数字。
shell脚本如下:123456789101112131415read -p "Please Enter a number: " Linefor ((i=1; i<=Line; i++))do for ((j=$Line-$i; j>0; j--)) do echo -n ' ' done for ((h=1; h<=$((2*$i-1)); h++)) do echo -n '*' done echodone
执行结果如下:1234567Please Enter a number: 6 * *** ***** ******* ********************